package com.pangzhao.ascii;

/**
 * 字符串转换成ascii码
 */
public class AsciiToChar {
    public static void main(String[] args) {
        String a = "AaZ";
        // 获取ascii码，需要把字符串转成字符
        char[] chars = a.toCharArray();
        System.out.println("开始遍历");
        for (char c : chars) {
            int asciiCode = c;
            System.out.println(asciiCode);
        }
    }
}
